package cn.bx.consumer.ctrl;

import cn.bx.consumer.service.RoleService;
import org.example.pojo.Userrole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RoleController {
    @Autowired
    private RoleService roleClient;

    @GetMapping(value = "findRoles", produces = "application/json;charset=utf-8")
    public List<Userrole> findRoles() {
        return roleClient.findRoles();
    }
}
